#include <catch2/catch.hpp>

#include "053_easy.hpp"

using namespace jianzhi_053;

TEST_CASE("053", "[JIANZHI][053]")
{

SECTION("053-I") {
    CHECK(Solution().search({5,7,7,8,8,10}, 8) == 2);
    CHECK(Solution().search({5,7,7,8,8,10}, 6) == 0);
    CHECK(Solution().search({1}, 1)            == 1);
    CHECK(Solution().search({1}, 0)            == 0);
}

SECTION("053-II") {
    CHECK(Solution().missingNumber({0,1,3})             == 2);
    CHECK(Solution().missingNumber({0,1,2,3,4,5,6,7,9}) == 8);
    CHECK(Solution().missingNumber({0})                 == 1);
}

}
